<div class="panel panel-box" id="accordion" role="tablist" aria-multiselectable="true">
    <div class="panel-heading">
        <div class="titleimage">
            <h3 class="panel-title panel-title-font">
                实验平台
            </h3>
        </div>
    </div>
    <div class="panel panel-default">
        <div class="panel-heading">
                <a data-toggle="collapse" data-parent="#accordion" href="#collapseTwo" aria-expanded="false" aria-controls="collapseThree"style="color:black">
            <h4 class="accordion-title">
                    <img src="<?php echo yii::app()->baseUrl?>/images/platform1.png">
                    常用实验平台
            </h4>
                </a>
        </div>
        <div id="collapseTwo" class="panel-collapse in" role="tabpanel">
            <div class="panel-body"  style="padding: 0">
                <ul class="list-group">
                    <?php $pModel = Platform::model()->findAll(); ?>
                    <?php foreach ($pModel as $elem): ?>
                        <li class="list-group-item">
                            <span class="glyphicon glyphicon-cog" style="font-size: 11px;"></span>
                            <a href="<?php echo yii::app()->baseUrl . '/platform/view/' . $elem->id ?>"><?php echo $elem->title ?></a>
                        </li>
                    <?php endforeach; ?>
                </ul>
            </div>
        </div>
    </div>
    <div class="panel panel-default">
        <div class="panel-heading">
                <a data-toggle="collapse" data-parent="#accordion" href="#collapseThree" aria-expanded="false" aria-controls="collapseThree"style="color:black">
            <h4 class="accordion-title">
                    <img src="<?php echo yii::app()->baseUrl?>/images/platform2.png">
                    其他实验平台
            </h4>
                </a>
        </div>
        <div id="collapseThree" class="panel-collapse collapse" role="tabpanel">
            <div class="panel-body" style="padding: 0">
                <ul class="list-group">
                    <?php foreach ($this->model as $elem): ?>
                        <li class="list-group-item">
                            <span class="glyphicon glyphicon-cog" style="font-size: 11px;"></span>
                            <a href="<?php echo yii::app()->createUrl('/teaching/'.$elem->teaching_id)?>">

                                <?php
                                $content = strip_tags($elem->title);
                                if (mb_strlen($content, 'utf-8') > 12)
                                {
                                    echo mb_substr($content, 0, 12, 'utf-8') . "...";
                                } else
                                {
                                    echo $content;
                                }
                                ?>
                            </a>
                        </li>
                    <?php endforeach; ?>
                        <li class="list-group-item">
                            <!--<span class="pull-right">-->
                                <a href="<?php echo Yii::app()->createUrl('display/platformresources'); ?>">更多...</a>
                            <!--</span>-->
                        </li>
                </ul>
            </div>
        </div>
    </div>
</div>
